package com.test.clyq.serviceImpl;

import java.util.List;

import com.test.clyq.dao.ContentDao;
import com.test.clyq.entity.Content;
import com.test.clyq.entity.Users;
import com.test.clyq.service.ContentService;
import com.test.service.impl.BaseManager;
import com.test.util.Pagination;

/**
 * ContentServiceImpl. <br>
 * 评价选项内容管理.
 * <p>
 * Copyright: Copyright (c) 2010-3-17 下午04:30:46
 * <p>
 * Company: 北京宽连十方数字技术有限公司
 * <p>
 * Author: liuxl@c-platform.com
 * <p>
 * Version: 1.0
 * <p>
 */
public class ContentServiceImpl extends BaseManager implements ContentService {

	private ContentDao downFileDao;

	/**
	 * 添加评价选项内容
	 * 
	 * @param file
	 * @param user
	 */
	public void addContent(Content file, Users user) {
		downFileDao.addContent(file, user);
	}

	/**
	 * 删除评价选项内容
	 * 
	 * @param id
	 * @param user
	 */
	public boolean deleteContent(Long id, Users user) {
		return downFileDao.deleteContent(id, user);
	}

	public ContentDao getDownFileDao() {
		return downFileDao;
	}

	/**
	 * 通过分页获取评价选项内容
	 * 
	 * @param pagination
	 * @param categoryId
	 * @return
	 */
	public List<Content> getContentByPage(Pagination pagination, Long categoryId) {
		return downFileDao.getContentByPage(pagination, categoryId);
	}

	/**
	 * 获取所有评价选项内容
	 * 
	 * @param categoryId
	 *            所属栏目id
	 * @return
	 */
	public List<Content> getContents(Long categoryId) {
		return downFileDao.getContents(categoryId);
	}

	/**
	 * 获取一个评价选项内容
	 * 
	 * @param id
	 * @return
	 */
	public Content getOneContent(Long id) {
		return downFileDao.getOneContent(id);
	}

	public void setDownFileDao(ContentDao downFileDao) {
		this.downFileDao = downFileDao;
	}

	/**
	 * 修改评价选项内容
	 * 
	 * @param id
	 * @param user
	 */
	public void updateContent(Content file, Users user) {

	}
}
